package com.zhouxiaoge.访问着模式;

public class ComputerPartDisplayVisitor implements ComputerPartVisitor {
    public void visit(Keyboard keyboard) {
        System.out.println("Display keyboard!");
    }

    public void visit(Monitor monitor) {
        System.out.println("Display monitor!");
    }

    public void visit(Mouse mouse) {
        System.out.println("Display mouse!");
    }

    public void visit(Computer computer) {
        System.out.println("Display computer!");
    }
}
